<template>
  <el-header class="header">
    <div class="logo" @click="handleClickLogo">
      <img :src="logoImg" class="logo-img" />
      <span class="platform-name">{{ platformName || "职途运营中台" }}</span>
    </div>
  </el-header>
</template>
<script>
import logoImg from "@/assets/images/logoImg.png";
import { mapState } from "vuex";
export default {
  components: {},
  data() {
    return {
      timer: null,
      product_id: null,
      menuList: [], // 为了防止与selectList
      fullscreen: false,
      ztSearchShow: false, // 中台搜索展示flag
      ztMoreSelectShow: false, // 中台更多选择展示flag
      username: "",
      logoImg: logoImg,
    };
  },
  computed: {
    ...mapState(["platformName"]),
  },
  created() {},
  watch: {},
  methods: {
    handleClickLogo() {
      this.$router.push("/");
    },
  },
};
</script>
<style scoped lang="scss">
.header {
  height: 54px !important;
  position: fixed;
  z-index: 999;
  box-sizing: border-box;
  width: 100%;
  color: #222222;
  background: url("../assets/images/headBg.png") no-repeat;
  background-position: center;
  height: 100%;
  width: 100%;
  background-size: cover;
  display: flex;
  align-items: center;
  .logo {
    color: #222;
    display: flex;
    align-items: center;
    font-size: 18px;
    font-family: AlimamaShuHeiTi;
    margin-left: 8px;
    cursor: pointer;
    &-img {
      width: 24px;
      height: 24px;
      margin-right: 9px;
    }
    .platform-name {
      font-size: 18px;
      color: #222;
      font-family: AlimamaShuHeiTi;
    }
  }
}

.router-link,
.home-link {
  float: left;
  font-size: 14px;
  text-align: left;
  padding-right: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  line-height: 64px;
  height: 64px;
}

.router-link:hover,
.is-active {
  color: #3aa0ff;
}

.home-link {
  padding-left: 20px;
}

.zt-hover {
  float: left;
  font-size: 14px;
  cursor: pointer;
}

.zt-hover:hover,
.zt-focus {
  color: #3aa0ff;
  i {
    transform: rotate(180deg);
    transition: all 0.3s;
  }
}

.zt-divider {
  float: left;
  margin: 20px 20px 0 20px;
}

.drag-wrapper {
  display: inline-block;
}

.zt-more {
  float: left;
  margin-left: 10px;
  width: 7px;
  height: 7px;
  color: #d9d9d9;
  cursor: pointer;
}

.drag-class {
  padding-right: 10px;
}

.router-link-name {
  display: inline-block;
  width: 65px;
  height: 26px;
  line-height: 26px;
  border: dashed 1px #3aa0ff;
  color: #3aa0ff;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.header-user-con {
  display: flex;
  height: 64px;
  align-items: center;
  font-size: 14px;
  .logout {
    cursor: pointer;
    border-bottom: 1px solid #d8d1d1;
    padding-bottom: 1px;
    margin-left: 24px;
  }
}

.btn-fullscreen {
  transform: rotate(45deg);
  margin-right: 5px;
  font-size: 24px;
}

.btn-bell,
.btn-fullscreen {
  position: relative;
  width: 30px;
  height: 30px;
  text-align: center;
  border-radius: 15px;
  cursor: pointer;
}

// .btn-bell-badge {
//   position: absolute;
//   right: 0;
//   top: -2px;
//   width: 8px;
//   height: 8px;
//   border-radius: 4px;
//   background: #f56c6c;
//   color: #fff;
// }

// .btn-bell .el-icon-bell {
//   color: #fff;
// }

// .user-name {
//   margin-left: 10px;
// }

// .user-avator {
//   margin-left: 20px;
// }

// .user-avator img {
//   display: block;
//   width: 40px;
//   height: 40px;
//   border-radius: 50%;
// }

.el-dropdown-link {
  color: #fff;
  cursor: pointer;
}

.el-dropdown-menu__item {
  text-align: center;
}

.logout {
  margin-left: 10px;
}

.box-card {
  background-color: $background_head_color;
  border: 0px;
}
.box-card .el-col {
  margin-bottom: 20px;
}
.box-divider {
  margin: -15px 0px 0px 0;
  background-color: #797979;
}
.col-span-text {
  padding: 0px 10px 10px 10px;
  color: #f9f9f9;
}

.el-menu--popup-bottom-start {
  margin-top: 0px;
}
</style>

<style lang="scss">
.drag-popper {
  line-height: 0;
  font-size: 12px;
  padding: 9px 10px 14px 10px;
  min-width: 100px;
  text-align: center;
  .el-popover__title {
    font-weight: bold;
    font-size: 14px;
  }
}
</style>
